package com.frxuexi.visit.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.lib_base.entity.StatusBean
import com.frxuexi.visit.R

class StatusAdapter:BaseQuickAdapter<StatusBean,BaseViewHolder>(R.layout.item_status) {
    override fun convert(helper: BaseViewHolder, item: StatusBean) {
        val textView = helper.getView<TextView>(R.id.visit_status)
        textView.setText(item.title)
        if(item.isCheck){
            textView.setBackgroundResource(com.frxuexi.lib_base.R.drawable.shape_solid_lightblue)
            textView.setTextColor(context.getColor(com.frxuexi.lib_base.R.color.blue))
        }else{
            textView.setBackgroundResource(com.frxuexi.lib_base.R.drawable.shape_solid_lightgray)
            textView.setTextColor(context.getColor(com.frxuexi.lib_base.R.color.darkgray))
        }
    }
}